package com.syn.vr.cic;

import android.content.ComponentName;
import android.content.Intent;

import com.gaoyi.basemodule.baseUtil.AppUtil;
import com.gaoyi.basemodule.baseUtil.SPUtil;
import com.gaoyi.basemodule.baseconstant.SPName;

public class CicUtils {

    private static void startAttendanceApp(String pkgName, String cls) {
        try {
            Intent intent = new Intent(Intent.ACTION_MAIN);
            ComponentName componentName = new ComponentName(pkgName, cls);
            intent.setComponent(componentName);
            AppUtil.getContext().startActivity(intent);
        } catch (Exception ignored) {

        }

    }

    public static void startAttendanceApp() {
        if (SPUtil.getInstance().getBoolean(SPName.OPEN_CIC, false)) {
            startAttendanceApp("com.ebsl.AttendanceApp", "com.ebsl.AttendanceApp.MainActivity");
        }
    }
}
